{$layout}

{$template "node_menu"}

<h3>修改节点</h3>
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
    <input type="hidden" name="nodeId" :value="node.id"/>
    <table class="ui table definition selectable">
        <tr>
            <td class="title">节点名称 *</td>
            <td>
                <input type="text" name="name" maxlength="50" ref="focus" v-model="node.name"/>
            </td>
        </tr>
        <tr>
            <td>IP地址 *</td>
            <td>
                <node-ip-addresses-box :v-ip-addresses="node.ipAddresses"></node-ip-addresses-box>
                <p class="comment">用于访问节点和域名解析等。</p>
            </td>
        </tr>
        <tr>
            <td>所属集群</td>
            <td>
                <select class="ui dropdown" name="clusterId" style="width:10em" v-model="clusterId">
                    <option v-for="cluster in clusters" :value="cluster.id">{{cluster.name}}</option>
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="2"><more-options-indicator></more-options-indicator></td>
        </tr>
        <tbody v-show="moreOptionsVisible">
            <tr>
                <td>是否启用</td>
                <td>
                    <div class="ui checkbox">
                        <input type="checkbox" name="isOn" value="1" v-model="node.isOn"/>
                        <label></label>
                    </div>
                    <p class="comment">如果不启用此节点，此节点上的所有服务将不能访问。</p>
                </td>
            </tr>
        </tbody>
    </table>
    <submit-btn></submit-btn>
</form>